package com.ldzy.cart;

import com.ldzy.common.pojo.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "goods")
public interface GoodsApi {
    @GetMapping("/goods/{id}")
    public Goods getGoodsById(@PathVariable("id") Long id);

    @PostMapping("/goods/update")//更新库存
    public boolean update(@RequestBody Goods g);
}
